﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ApplicationGenerator.CommonModule;
using SampleApplication;

namespace CustomCode
{
    public class SetNewState : ICustomCode
    {
        #region ICustomCode Members

        public int ElementId
        {
            private get;
            set;
        }

        public void ExecuteCode()
        {
            Rental rental = Rental.Find(ElementId);
            rental.State = RentalState.New;
            rental.Save();
        }

        #endregion
    }
}
